/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author Cheng
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '/@/api/model/baseModel';

const { adminPath } = useGlobSetting();

export interface EquipmentFireAlarmProcess extends BasicModel<EquipmentFireAlarmProcess> {
  enterpriseCode?: string; // 企业编码，唯一标识企业
  enterpriseName?: string; // 企业名称
  equipmentId?: string; // 设备ID
  equipmentName?: string; // 设备名称
  supervisorCode?: string; // 监督员编码
  supervisorName?: string; // 监督员姓名
  alertTime?: string; // 预警时间，记录发生预警的时间点
  alertName?: string; // 预警名称，描述预警的类型或主题
  alertContent?: string; // 预警内容，详细描述预警信息
  detailedAddress?: string; // 详细地址，记录设备所在具体位置
  hasFire?: string; // 是否有火情，1 有火情  2.误报
  createTime?: string; // 创建时间，记录数据插入时间，默认为当前时间
  hasTimeout?: string; // 是否有超时情况，1 有超时  2.没有超时
  endPicUrl?: string; // 结束图片地址，记录预警结束时设备的照片
  endPicUrlId?: string; // 结束图片ID，记录预警结束时设备的照片ID
}

export const equipmentFireAlarmProcessList = (params?: EquipmentFireAlarmProcess | any) =>
  defHttp.get<EquipmentFireAlarmProcess>({ url: adminPath + '/equipment/alarm/process/equipmentFireAlarmProcess/list', params });

export const equipmentFireAlarmProcessListData = (params?: EquipmentFireAlarmProcess | any) =>
  defHttp.post<Page<EquipmentFireAlarmProcess>>({ url: adminPath + '/equipment/alarm/process/equipmentFireAlarmProcess/listData', params });

export const equipmentFireAlarmProcessForm = (params?: EquipmentFireAlarmProcess | any) =>
  defHttp.get<EquipmentFireAlarmProcess>({ url: adminPath + '/equipment/alarm/process/equipmentFireAlarmProcess/form', params });

export const equipmentFireAlarmProcessSave = (params?: any, data?: EquipmentFireAlarmProcess | any) =>
  defHttp.postJson<EquipmentFireAlarmProcess>({ url: adminPath + '/equipment/alarm/process/equipmentFireAlarmProcess/save', params, data });

export const equipmentFireAlarmProcessDelete = (params?: EquipmentFireAlarmProcess | any) =>
  defHttp.get<EquipmentFireAlarmProcess>({ url: adminPath + '/equipment/alarm/process/equipmentFireAlarmProcess/delete', params });
